package xyz.caijiwang.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.caijiwang.entity.User;
import xyz.caijiwang.service.UserService;

@RestController
@RequestMapping("/login")
public class UserController {
    @Autowired
    UserService userService;

    @GetMapping("/select/{id}")
    public User sel(@PathVariable Integer id){
        return userService.selectById(id);
    }
}
